<template>
	<view class="page-newsMy padding-top-sm">
		<view class="cu-list menu sm-border custom-list">
			<block v-for="(item,index) of list" :key="index">
				<view class="cu-item">
					<view class="flex flex-direction justify-start">
						<view class="text-bold">{{item.type_man}}</view>
						<view>{{item.content}}</view>
						<view>{{item.create_time}}</view>
					</view>
					<view class="action">
						<button class="cu-btn round custom-btn-follow" v-if="item.type === 1">
							<view>围观</view>
						</button>
						<button class="cu-btn round custom-btn-follow" v-else-if="item.type === 4">
							<view>查看</view>
						</button>
					</view>
				</view>
			</block>
		</view>
	</view>
</template>

<script>
	import profileMixin from "@/mixins/profile"
	export default {
		mixins: [profileMixin],
		data() {
			return {
				query:{
					page: 1,
					size: 10
				}
			};
		},
		methods: {
			toPage(item) {
				if (item.type === 'jump') {
					this.$h.router.push({
						path:item.jumpPath
					})
				}
			},
			getList(){
				this.m_getList(this.$h.api.userModel.getMyMessages, this.query)
			}
		},
		onLoad() {
			this.getList()
		}
	}
</script>
<style>
	page {
		background-color: #fff;
	}
</style>
<style lang="scss" scoped>
	.page-newsMy {
		.cu-list.menu.sm-border.custom-list {
			.cu-item {
				height: 126rpx;
				padding: 0 20rpx;

				&::after {
					border-bottom: 2rpx solid $bgColor;
					left: 20rpx;
					width: calc(200% - 40px);
				}

				.cu-avatar.custom-avatar {
					width: 50rpx;
					height: 50rpx;
				}
			}
		}
	}
</style>
